﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace xna_game_engine.source
{
    abstract public class BaseSpell
    {
        public enum SPELL_TYPE {NO_TYPE = 0, DAMAGE, HEAL, REFLECT};
        // * Members * //
        protected BaseWizard mOwner;
        //protected List<CEffect> mEffects;
        protected TongaTimer mCoolTimer;
        protected string mName;
        protected int mRange;
        protected string mDescription;
        protected Texture2D mModel;
        protected Vector2 mPos, mVelocity;
        protected bool mIsActive;
        protected Rectangle mBoundingBox;
        protected int mDamage;
        protected SPELL_TYPE mSpellType;
        // animation type

        public BaseSpell(BaseWizard own)
        {
            mIsActive = false;
            mOwner = own;
            mSpellType = SPELL_TYPE.NO_TYPE;
        }

        // Force all children to implement these functions
        abstract public void Use();
        abstract public void Update(GameTime gt);
        abstract public void Draw();

        public BaseSpell Clone()
        {
            return (BaseSpell)this.MemberwiseClone();
        }

        // * Properties * //
        public string Name
        {
            get { return mName; }
        }

        public bool Active
        {
            get { return mIsActive; }
        }
        public Rectangle Bounds
        {
            get { return mBoundingBox; }
        }
        public int Damage
        {
            get { return mDamage; }
        }
        public BaseWizard Owner
        {
            get { return mOwner; }
        }

        public SPELL_TYPE Type
        {
            get { return mSpellType; }
        }
    }
}
